home *** CD-ROM | disk | FTP | other *** search
- .f3 - # - Chapter 7 - Search & Replace
- .rm70
- .tc
- .tc1
- .tc 7. FINDING AND REPLACING TEXT .........................#
- CHAPTER 7 FINDING AND REPLACING TEXT
-
- .irFinding;Finding - see Search & Replace
- .imSearch & Replace
- Word Fugue can find, find and replace (or delete), or find and apply a
- macro to any word or phrase (string of characters) in a file.
-
- The commands are:
-
- Ctrl Q F - Finds a string
- Ctrl Q A - Finds a string and replaces it with another
- Ctrl Q M - Finds a string and applies a macro at the
- cursor position
- Ctrl L - Repeat the last fine or replace operation
- .ix Next occurrence (^L)
-
- .Tc Search .............................................#
- Search
-
- .ix Search (F5 or ^KF)
- First, you must tell Word Fugue that you wish to search for text. You
- can do this in any of 3 ways:
-
- (i) Press function key F5
-
- or (ii) Activate the pull down menu. Press S for Search,
- followed by F for Find
-
- or (iii) Press CTRL Q F (this is a WordStar command)
-
- A pop up window will appear on the screen with the words Search for:
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Search for ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ ∫
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- Fig 7.1 - Search Prompt
- .tc1 Fig 7.1 - Search Prompt ...............................#
-
-
- Type in the letters you wish to find and press return. Word Fugue will
- prompt you for options for the command Options:
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Options (UBGWL) ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫beggin ∫
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- Fig 7.2 - Search Options
- .tc1 Fig 7.2 - Search Options ..............................#
-
-
- .CP15
- The options available are:
- .ix Options (Search)
-
- .ix Ignore Case
- U Upper case - treat the string to search for and the file
- as if they are all in upper case. Thus and will match
- and AND anD AnD aNd . If you do not enter this
- option then the case of the letters will be important.
- This means that and will only match and
-
- .ix Backwards
- B Backward - This tells Word Fugue to search backwards from the
- cursor position. If you do not specify this, then Word Fugue
- will search forward.
-
- .ix Whole words only
- W Word only - This tells Word Fugue to search for whole words
- only, and not to match bits of words
- Thus and will match and only.
- If you do not specify this, and will match with
- band sand andalusium and so on.
-
- .ix Marked Block
- L Locally - this means that Word Fugue will search the marked
- block as long as it is visible.
-
- .ix nth Occurrence
- n Where n is an integer. Search for the nth occurrence of the
- string.
-
- .ix Global
- G Global search. For finds this means always start from the top
- of the file.
-
- Press enter when you have entered the options, and Word Fugue will
- search for the letters.
-
- The cursor stops on the first occurrence of them. Press CTRL L to find
- the next occurrence (unless you used the G option). Keep pressing CTRL
- L once for each occurrence.
-
- When Word Fugue stops finding the text, you will be informed:
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ Not found - Press ESC to continue ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- .cp5
- .Tc Replacing text .....................................#
- Replacing text
-
- .ix Replace
- First, you must tell Word Fugue that you wish to replace text. You can
- do this in any of 3 ways:
-
- (i) Press function key F6
-
- or (ii) Activate the pull down menu. Press S for Search,
- followed by R for Replace
-
- or (iii) Press CTRL Q A (this is a WordStar command)
-
- .CP9
- A pop up window will appear on the screen with the word Search for
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Search for ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ ∫
- ∫ ∫
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- Type in the letters and press return. Word Fugue will prompt with
- Replace. Type the letters you wish the to use for replacement.
- {.Œ}
-
- .cp10
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Replace with ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫beggin ∫
- ∫begin ∫
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- Fig 7.3 - Replace Prompt
- .tc1 Fig 7.3 - Replace Prompt ..............................#
-
-
- Word Fugue will then prompt you with Options
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Options (UBGWLN) ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫beggin ∫
- ∫begin ∫
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- The options available are the same as for FIND above, with the
- following additions:
-
- .ix Options (Replace)
- .ir Options (Replace) See also Search options
- .ix Global
- G Global search - go to the top of the file, and search for all
- occurrences, and replace them. You do not need to press CTRL L
- for the next occurrence. If you also specified the B option,
- then Word Fugue will go to the end of the file and search
- backwards.
-
- .ix Without asking approval
- N Do not ask. The default when replacing is to ask you whether
- you wish to replace this occurrence.
-
- If you specify N option, then Word Fugue will not ask you, but
- will replace every occurrence.
-
- If the N option is not specified, a prompt will occur each
- time the search pattern is found. This prompt will provide the
- following options:
-
- Y - replace this text and continue searching.
- N - do Not replace, but continue searching.
- A - replace this text and replace All others without prompting.
- Q - do not replace, and Quit searching.
-
- Press enter when you have typed in any options. (You do not need to
- type in options). The cursor jumps to the first occurrence of and
- replaces it with the new letters.
-
-
- .ixTIPS; Speeding Global replace
- TIP - when doing a Global replace with the N option, Word Fugue still
- shows you each occurrence as it replaces it. This takes time to
- update the screen each time. If you wish to speed it up, and do
- not want to see each occurrence as it is changed, press Page Up
- or Page Down as Word Fugue is working. The screen will stop
- updating until Word Fugue has finished the search and replace
- operation.
-
- .cp10
- .Tc Find And Apply Macro ...............................#
- Find And Apply Macro
-
- .ix Apply Macro
- First, you must tell Word Fugue that you wish to replace text. You can
- do this in either of 2 ways.
-
- (i) Activate the pull down menu. Press S for Search,
- followed by U for Use Macro
-
- or (ii) Press CTRL Q M
-
- A pop up window will appear on the screen with the word Search for
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Search for ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ ∫
- ∫ ∫
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- Type in the letters and press return. Word Fugue will prompt with a
- menu of available macros. {.Œ}
- {.Œ}
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Macros ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ 0 spare ∫
- ∫ 1 delete word left ∫
- ∫ 2 ^P^K - index marker ∫
- ∫ 3 Set Wide Characters ∫
- ∫ 4 Capitalise this letter, go to next word ∫
- ∫ 5 Spell check this word ∫
- ∫ 6 Transpose letters ∫
- ∫ 7 Print block ∫
- ∫ 8 spare ∫
- ∫ 9 Toggle Case ∫
- ∫ 10 A - paste Calculation Result ∫
- ∫ 11 B - ˛ bullet ∫
- ∫ 12 C - .CP cmd ∫
- ∫ 13 D - Date dd month yyyy ∫
- ∫ 14 Even blank page ∫
- ∫ 15 F - Create label file ∫
- ∫ 16 G - Copy label block to Label file ∫
- ∫ 17 H - Print label file on 1´" labels ∫
- ∫ 18 I - Clear label file ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕv≥ ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- Select the macro you want to use with the
- cursor keys and press Enter. Remember that the cursor is positioned at
- the end of the search string.
-
- Word Fugue will then prompt you with Options
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Options (UBGWLN) ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫beggign ∫
- ∫Transpose letters ∫
- ∫ug ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
- The options available are the same as for REPLACE above.
-
- Press enter when you have typed in any options. (You do not need to
- type in options). The cursor jumps to the first occurrence of and
- applies the macro.
-
- You can also nest this command within other macros, leading to
- arbitrarily complex commands.
-
- .CP5
- .tc Find Matching >}]) or end ..........................#
- Find Matching >}]) or end
-
- .ix Find matching >}]) or end
- This command makes life easier for programmers by allowing you to see
- if your brackets are matched. It also allows you to match begin end
- pairs, but be aware that some language constructs have an end but no
- explicit begin. An example of this is Pascal's Case statement.
-
- Place the cursor on ({[< and press the command Ctrl K [. The cursor
- will be positioned on the matching >]}) or you will receive an error
- message if none can be found. Also, if you place the cursor on the B
- of begin and Word Fugue will position the cursor on the matching end
- for you. Please note that Word Fugue does not understand the syntax of
- various languages, so any constructs that do not have a begin but do
- have an end will throw out its count of begin end pairs.